//
//  ViewController.swift
//  FSL-ScrollViewPage
//
//  Created by 我演示 on 2019/10/30.
//  Copyright © 2019 Jerry-Fu. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        let titles = ["游戏","娱乐","趣玩","美女","颜值"]
        
        var childVcs = [UIViewController]()
        for _ in 0 ..< titles.count {
            let vc = UIViewController()
            vc.view.backgroundColor = UIColor.randomColor()
            
            childVcs.append(vc)
        }
        
        /**分析*/
        let pageFrame = CGRect(x: 0, y: 0, width: view.bounds.width, height: view.bounds.height)
        
        let titStype = FSLTitleStyle()
//        titStype.titleHeight = 44
        /**4:  创建对应的信息*/
        let pageView = FSLPageView(frame: pageFrame, titles: titles, childVcs: childVcs, parentVc: self , titleStype: titStype )
        
        view.addSubview(pageView)
        
    }


}

